package orbito.ui;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JComponent;

import orbito.GameController;

@SuppressWarnings("serial")
public class GameCanvas extends JComponent {
	
	GameController game;
	
	public GameCanvas(int initialWidth, int initialHeight) {
		setPreferredSize(new Dimension(initialWidth, initialHeight));
	}
	
	public void paintComponent(Graphics g) {
		game.render((Graphics2D) g);
	}
	
	public void setGameController(GameController control) {
		this.game = control;
	}
}
